<div>
    <br>
    <ol class="breadcrumb">
        <li class="active"><span class="glyphicon glyphicon-home" style="color:#23527c"></span>&nbsp;<mainpage></mainpage></li>
        <li class="active">运维工作台 / 参数配置管理 / 规则参数管理 / 错误码管理</li>
    </ol>
    
    <ul class="nav nav-tabs marT15">
      <li role="presentation" class="active"><a href="#/errorCodemManagement" style="color: #555;">错误码管理</a></li>
      <li role="presentation" ><a href="#/errorCodeImport" style="color:#555;">错误码导入</a></li>
      <li role="presentation"><a href="#/errorCodeImportDetail" style="color: #555;">错误码导入明细</a></li>
    </ul> 

    <form class="form-inline" action="errorMng/out-excel" method="post" id="form">
        <div class=" marB15 clearfix">
            <div class="left marT15 marR10">
           
                <span class="search-name">错误码</span>
                <input type="text" class="form-control1" placeholder="" 
                ng-keyup='search($event)'
                ng-model="searchData.errCode">
             
            </div>
            <div class="left marT15 marR10">
              
                <span class="search-name">错误码描述</span>
                <input type="text" class="form-control1" placeholder="" 
                ng-keyup='search($event)'
                ng-model="searchData.errMsg">
             
            </div>
            <div class="left marT15 marR10">
                <span class="search-name">来源类型</span>
                <select class="form-control1" ng-model="searchData.fromType">
                    <option value="">全部</option>
                    <option value={{row.DICVALUE}} ng-repeat="row in errorListData">{{row.DICVALUENAME}}</option>
                </select>
            </div>
            <div class="left marT15 marR10">
                <span class="search-name">错误码类型</span>
                <select class="form-control1" ng-model="searchData.errType">
                    <option value="">全部</option>
                    <option value="0">短信发送错误码</option>
                    <option value="1">状态报告错误码</option>
                </select>
            </div>
            <div class="left marT15 marR10">
                <span class="search-name">状态</span>
                <select class="form-control1" ng-model="searchData.status">
                    <option value="">全部</option>
                    <option value="1">有效</option>
                    <option value="0">无效</option>
                </select>
            </div>
            <a href="javascript:;" class=" btn btn-primary btn-sm left marR10 marT15" id="search" ng-click='search()'><span class="glyphicon glyphicon-search"></span></a>
        </div>
    </form>


     <div class="table-box">

            <table class="table table-bordered table-striped text-center bg-info">
                <thead >
                <tr class="info">
                    <th class="text-center">序号</th>
                    <th class="text-center">来源类型</th>
                    <th class="text-center">错误码类型</th>
                    <th class="text-center">错误码</th>
                    <th class="text-center">对应短信平台错误码</th>
                    <th class="text-center">错误码描述</th>
                    <th class="text-center">状态</th>
                    <th class="text-center">操作</th>
                </tr>
                </thead>
                <tbody>
                <tr ng-repeat="Item in result">
                    <td>{{ $index+1 }}</td>
                    <td class="w85">
                    	{{ Item.fromTypeName }}
                    </td>
                    <td class="w115">
                    	<span ng-if='"1"==Item.errType' >状态报告错误码</span>
                      <span ng-if='"0"==Item.errType' >短信发送错误码</span>
                    </td>
                    <td class="w70">{{ Item.errCode }}</td>
                    <td style="min-width: 160px;">{{ Item.innerCode}}</td>
                    <td class="w115">{{ Item.errMsg }}</td>
                    <td>
                      <span ng-if='"1"==Item.status' >有效</span>
                      <span ng-if='"0"==Item.status' >无效</span>
                    </td>
                    <td style="min-width: 200px">
                            <a class="marR10" 
                            ng-click='changeStstus($index,Item.recId,Item.status)'
                            ng-show="'0'===Item.status">生效</a>
                            <a class="marR10" 
                            ng-click='changeStstus($index,Item.recId,Item.status)' 
                            ng-show="'1'===Item.status">失效</a>
                            <a class="marR10" data-toggle="modal" data-target="#add" ng-click="editTr('修改',Item.recId)">修改</a>
                            <a class="" data-toggle="modal" data-target="#delete" ng-click="delete(Item.recId,$index)">删除</a>
                    </td>
                </tr>
                </tbody>
                <tfoot>
                  <tr>
                   <td><a ng-click="editTr('添加')"  class="glyphicon glyphicon-plus" data-toggle="modal" data-target="#add"></a></td>
                   <td></td>
                   <td></td>
                   <td></td>
                   <td></td>
                   <td></td>
                   <td></td>
                   <td></td>
                 </tr>
               </tfoot>
            </table>
      </div>


            <div class="flip">
                <page></page>
            </div>
</div>
<!-- 修改程序弹框 -->
<!-- <div class="modal fade" id="modify" tabindex="-1" role="dialog" aria-labelledby="modify">
    <div class="modal-dialog" role="document">
        <div class="modal-content" style="width:620px">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
                <h4 class="modal-title" id="">修改</h4>
            </div>
            <div class="modal-body">
           <div class="row marB15"> 
               <div class="col-xs-6">
                <label class="left"><span>来源类型</span></label>
                    <select class="form-control line4 right" ng-model="addData.fromType">
                        <option value="sgip1.2">sgip1.2</option>
                        <option value="cmpp2">cmpp2</option>
                    </select>
                </div>
               <div class="col-xs-6">
                <label class="left"><span>错误码类型</span></label>
                    <select class="form-control line4 right" ng-model="addData.errType">
                        <option value="0">短信发送错误码</option>
                        <option value="1">状态报告错误码</option>
                    </select>
                </div>
           </div>
            <div class="row marB15"> 
               <span class="col-xs-6">
                   <label class="left"><span>错误码ID（ID不能超过20个字符）</span></label>
                    <input type="text" class="form-control line4 right" ng-model="addData.recId"/>
               </span>
               <span class="col-xs-6">
                   <label class="left"><span>对应短信平台错误码（0-126间的数字）</span></label>
                    <input type="text" class="form-control line4 right" ng-model="addData.errCode"/>
               </span>
           </div>
           <div class="row marB15"> 
               <span class="col-xs-6">
                <label class="left"><span>状态</span></label>
                    <select class="form-control line4 right" ng-model="addData.status">
                        <option value="1">生效</option>
                        <option value="0">无效</option>
                    </select>
                </span>
                <span class="col-xs-6">
                
                </span>
           </div>
           <div class="row marB15">
               <span class="col-xs-12">
                   <label class="left"><span>说明</span></label>
                    <textarea class="form-control right"  ng-model="addData.desc"></textarea>
               </span>
           </div>
        </div>
        <div class="modal-footer">
            <button type="button" class="btn btn-default btn-sm" data-dismiss="modal">取消</button>
            <button type="button" class="btn btn-primary btn-sm" ng-click="editSave()">保存</button>
        </div>
        </div>
    </div>
</div> -->
<!-- 添加 -->
<div class="modal fade" id="add" tabindex="-1" role="dialog" aria-labelledby="add">
    <div class="modal-dialog" role="document">
        <div class="modal-content" style="width:620px">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
                <h4 class="modal-title" id="">{{popup}}错误码信息</h4>
            </div>
            <div class="modal-body">
           <div class="row marB15"> 
               <div class="col-xs-6">
                <label class="left"><span>来源类型</span></label>
                    <select class="form-control line4 right" ng-model="addData.fromType">
                        <option value="">--请选择--</option>
                        <option value={{row.DICVALUE}} ng-repeat="row in errorListData">{{row.DICVALUENAME}}</option>
                    </select>
                </div>
               <div class="col-xs-6">
                <label class="left"><span>错误码类型</span></label>
                    <select class="form-control line4 right" ng-model="addData.errType">
                    	<option value="">--请选择--</option>
                        <option value="0">短信发送错误码</option>
                        <option value="1">状态报告错误码</option>
                    </select>
                </div>
           </div>
            <div class="row marB15"> 
               <span class="col-xs-6">
                   <label class="left"><span>错误码ID</span></label>
                    <input type="text" ng-disabled='isDisabled' class="form-control line4 right" ng-model="addData.errCode" maxlength="20" placeholder="id不能超过20个字符" />
               </span>
               <span class="col-xs-6">
                   <label class="left"><span>对应短信平台错误码</span></label>
                    <input type="text" class="form-control line4 right" 
                    ng-model="addData.innerCode" 
                    onkeyup="this.value=this.value.replace(/\D/g,'')"
                    placeholder="0-126间的数字" />
               </span>
           </div>
           <div class="row marB15"> 
               <span class="col-xs-6">
                <label class="left"><span>状态</span></label>
                    <select class="form-control line4 right" ng-model="addData.status">
                        <option value="1">有效</option>
                        <option value="0">无效</option>
                    </select>
                </span>
                <span class="col-xs-6">
                
                </span>
           </div>
           <div class="row marB15">
               <span class="col-xs-12">
                   <label class="left"><span>错误码描述</span></label>
                    <textarea class="form-control right" id="desc"  ng-model="addData.errMsg"></textarea>
               </span>
           </div>
        </div>
        <div class="modal-footer">
            <button type="button" class="btn btn-default btn-sm" data-dismiss="modal">取消</button>
            <button type="button" class="btn btn-primary btn-sm" ng-click="editSave()">保存</button>
        </div>
        </div>
    </div>
</div>
<!--修改程序结束-->
<!-- 参数添加结束 -->
<!-- 提示框 -->
<div class="modal fade" id="delete">  
  <div class="modal-dialog">  
    <div class="modal-content message_align">  
      <div class="modal-header">  
        <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button>  
        <h4 class="modal-title">提示信息</h4>  
      </div>  
      <div class="modal-body">  
        <p>您确认删除吗？</p>  
      </div>  
      <div class="modal-footer">  
         <input type="hidden" id="url"/>  
         <button type="button" class="btn btn-default" data-dismiss="modal">取消</button>  
         <a class="btn btn-primary" data-dismiss="modal" ng-click='deleteTr()'>确定</a>  
      </div>  
    </div><!-- /.modal-content -->  
  </div><!-- /.modal-dialog -->  
</div><!-- /.modal -->                         
<!-- 提示框结束 -->
<!-- 加载框 -->
  <span class='loaded' ng-show='loaded'><img  src="img/load.gif"></span>
<!-- 加载框 完成-->